home *** CD-ROM | disk | FTP | other *** search
- '*********************** GETCPU3.BAS *************************
- '
- ' ███████┐ ███████┐ ██┐ ██┐
- ' ██┌────┘ ██┌──██│ ██│ ██│
- ' ██│ ███████│ ██│ ██│
- ' ██│ ██┌────┘ ██│ ██│
- ' ███████┐ ██│ ███████│
- ' └──────┘ └─┘ └──────┘
- '
- 'This program uses an Assembly FUNCTION to get the CPU number.
- '
- 'It was made with the GETCPU2.OBJ Assembly program written by:
- '
- 'Cliff Brown CIS# 71650,423 8-30-90
- '
- 'Found in a Public Domain file set on CompuServe as GETCPU.ZIP
- '
- 'Until now I was unable to figure out how to take GETCPU2.OBJ and
- 'make a Quick Library with it.... =and= a *.LIB as both are needed
- 'to use compile GETCPU2.OBJ into a standalone *.EXE program.
- '
- 'This file set includes those two libraries (*.QLB, *.LIB).
- '
- 'If you load GETCPU.QLB as your library in the QuickBASIC environment
- 'with the command:
- '
- ' QB.EXE GETCPU2.BAS /L GETCPU2.QLB
- '
- ' note file name
- '
- 'you can compile a standalone *.EXE program which will display the CPU
- 'number up to a 80486. Don't know what happens when you run it with a
- 'PENTIUM, let me know.... We have no PENTIUM computers here.
- '
- 'Now.... if you want to =add= GETCPU2.OBJ to your QB.QLB, "all" you
- 'have to do is:
- '
- ' LINK /Q QB.QLB GETCPU2.OBJ
- '
- 'Then make a *.LIB... (see beginning of text). Yeah... sure....
- '
- 'No it's not that easy, so I included the files:
- '
- ' CPU_QB.QLB and CPU_QB.LIB
- '
- 'which contain all the library code for CALL INTERRUPT -and- GETCPU2.QLB.
- '
- 'Use:
- '
- ' QB.EXE GETCPU3.BAS /L CPU_QB.QLB
- '
- ' note file name
- '
- 'to use CALL INTERRUPT and get the CPU number.
- '
- 'John De Palma on CompuServe 76076,571
- '
- '12/8/94
- '=================================================================
-
- DEFINT A-Z
-
- 'CONST True = -1, False = 0
-
- DECLARE FUNCTION DOSVersion! ()
- DECLARE SUB Splash2 (Choice%)
- DECLARE SUB StarFlag ()
- DECLARE SUB TwoColrs (Fgd%, Bkg%, Colr%)
- DECLARE FUNCTION Center% (text$)
- DECLARE FUNCTION OneColr% (Fgd%, Bkg%)
- DECLARE SUB TextBoxShadow (Row%, Col%, Message$, Outline%, Shadow%, Length%)
- DECLARE SUB LocateIt (Row%, text$)
- DECLARE SUB PressAnyKey ()
- DECLARE FUNCTION GetCPU2%
- DECLARE SUB GetColr (Fgd%, Bkg%, Colr%)
- DECLARE SUB SetBorder (ColrByte%)
-
- 'executable code follows....
- '$INCLUDE: 'qb.bi' 'must have for CALL INTERRUPT
-
- Copyright$ = "■Copyright (c) 1994 LearnWare (c) ■ John De Palma■"
-
- DIM SHARED Regs AS RegType
- REDIM SHARED Box$(1 TO 56)
-
- 'get the screen color and store it as an INTEGER before we change it
- CALL GetColr(Fgd%, Bkg%, RestoreColr%)
-
- 'some multimedia stuff
- CLS
- BaseRow% = 2
-
- 'First CALL INTERRUPT SUB
- CALL SetBorder(4)
-
- CALL StarFlag
- SLEEP 2
- CALL PressAnyKey
- CALL SetBorder(3)
- COLOR 15, 1
- CALL Splash2(1)
- SLEEP 2
- CALL PressAnyKey
- CALL SetBorder(2)
-
- COLOR 15, 4
- Row% = BaseRow%: Col% = 0: Outline% = 5: Shadow% = True: Length% = 2
- text$ = "A test for your CPU!"
- Message$ = SPACE$(LEN(text$))
- CALL TextBoxShadow(Row%, Col%, Message$, Outline%, Shadow%, Length%)
- CALL LocateIt(BaseRow% + 2, text$)
-
- COLOR 14, 7
- Row% = BaseRow% + 8: Col% = 0: Outline% = 0: Shadow% = True: Length% = False
- Message$ = "CPU"
- CALL TextBoxShadow(Row%, Col%, Message$, Outline%, Shadow%, Length%)
-
- 'Here's the Assembly CPU FUNCTION
- 'We get rid of the leading space in the number that is returned
- CPUtext$ = "80" + LTRIM$(STR$(GetCPU2%))
- CALL LocateIt(Row% + 2, CPUtext$)
-
- COLOR 14, 7
- Row% = BaseRow% + 18: Col% = 5: Outline% = 0: Shadow% = True: Length% = False
- text$ = "DOS Version"
- Message$ = SPACE$(LEN(text$) - 4)
- CALL TextBoxShadow(Row%, Col%, Message$, Outline%, Shadow%, Length%)
-
- 'Now a CALL INTERRUPT to get the DOS Version
- DOStext$ = LTRIM$(STR$(DOSVersion!))
- LOCATE Row% + 1, Col% + 1
- PRINT text$
- LOCATE Row% + 2, Col% + INT(LEN(text$) / 2)
- PRINT DOStext$
- SLEEP 2
- CALL PressAnyKey
- CALL SetBorder(14)
-
- COLOR 13, 4
- Row% = BaseRow% + 15: Col% = 0: Outline% = 1: Shadow% = True: Length% = False
- text$ = "John De Palma on CompuServe 76076,571"
- Message$ = SPACE$(LEN(text$))
- CALL TextBoxShadow(Row%, Col%, Message$, Outline%, Shadow%, Length%)
- COLOR 15, 4
- CALL LocateIt(BaseRow% + 16, text$)
-
- SLEEP 2
- CALL PressAnyKey
-
- 'restore screen color
- CALL TwoColrs(Fgd%, Bkg%, RestoreColr%)
- 'set screen border to black
- CALL SetBorder(0)
- COLOR Fgd%, Bkg%
- CLS
- END
-
- FUNCTION Center% (text$)
- Center% = 41 - LEN(text$) \ 2
- END FUNCTION
-
- SUB ColorIt (Fgd, Bkg)
- COLOR Fgd, Bkg
- END SUB
-
- FUNCTION DOSVersion! STATIC
-
- 'DIM Regs AS RegType
- Regs.ax = &H3000
- INTERRUPT &H21, Regs, Regs
- major% = Regs.ax MOD 256
- minor% = Regs.ax \ 256
- DOSVersion! = major% + (minor% / 100!)
-
- END FUNCTION
-
- SUB GetColr (Fgd%, Bkg%, Colr%) STATIC
-
- Colr% = SCREEN(1, 1, 1)
-
- Fgd% = (Colr% AND 128) \ 8 + (Colr% AND 15)
- Bkg% = (Colr% AND 112) \ 16
-
- END SUB
-
- SUB IsCursor (IfTrue%)
- 'Like this better than two SUBs of CursorOn and CursorOff
- 'Especially with the trouble changing the code with QuickPak
- 'and PDQ
- IF IfTrue% = True THEN
- 'LOCATE , , 1, 4, 7 'big cursor
- LOCATE , , 1
- ELSE
- LOCATE , , 0
- END IF
- END SUB
-
- DEFSNG A-Z
- SUB LocateIt (Row%, text$)
- LOCATE Row%, 41 - (LEN(text$)) \ 2
- PRINT text$;
- END SUB
-
- DEFINT A-Z
- FUNCTION OneColr% (Fgd%, Bkg%)
- OneColr% = (Fgd% AND 16) * 8 + ((Bkg% AND 7) * 16 + (Fgd% AND 15))
- END FUNCTION
-
- SUB PressAnyKey
-
- text$ = " PRESS: A Key to Continue... "
- Row% = CSRLIN
- Col% = POS(0)
- 'get color on row 24
- Colr% = SCREEN(24, Center(text$), 1)
- CALL TwoColrs(Fgd%, Bkgd%, Colr%)
- LOCATE 24, Center(text$)
- COLOR 11, 0
- GOSUB StoreText
-
- PRINT text$;
- COLOR Fgd%, Bkgd%
- WHILE INKEY$ = "": WEND
- WHILE INKEY$ <> "": WEND 'need this to remove the key press
- LOCATE 24, Center(text$)
- PRINT StoreScreenLine$;
- 'PRINT SPACE$(LEN(text$));
- LOCATE Row%, Col%
- EXIT SUB
- StoreText:
-
- FOR i% = 1 TO LEN(text$)
- StoreScreenLine$ = StoreScreenLine$ + CHR$(SCREEN(CSRLIN, i%))
- NEXT
- RETURN
- END SUB
-
- SUB SetBorder (ColrByte%) STATIC
-
- 'DIM Regs AS RegType
- Regs.ax = &H1001
- Regs.bx = ColrByte% * &H100
- CALL INTERRUPT(&H10, Regs, Regs)
-
- END SUB
-
- SUB Splash2 (Choice%)
- 'prints a full screen of: ⌠⌠⌠⌠⌠⌠⌠⌠
- ' ⌡⌡⌡⌡⌡⌡⌡⌡
-
- SELECT CASE Choice%
- CASE 1
- Char1% = 244
- Char2% = 245
- CASE 2
- Char1% = 174
- Char2% = 175
- CASE 3
- Char1% = 242
- Char2% = 243
- CASE 4
- Char1% = 47
- Char2% = 92
- CASE 5
- Char1% = 220
- Char2% = 240
- CASE 6
- Char1% = 221
- Char2% = 222
- CASE 7
- Char1% = 180
- Char2% = 195
- CASE 8
- Char1% = 254
- Char2% = 222
- CASE 9
- Char1% = 146
- Char2% = 158
- CASE 10
- Char1% = 159
- Char2% = 159
- CASE ELSE
- Char1% = 244
- Char2% = 245
- END SELECT
-
- FOR i = 1 TO 25 STEP 2
- LOCATE i, 1
- PRINT STRING$(80, Char1%);
- NEXT
- FOR i = 2 TO 24 STEP 2
- LOCATE i, 1
- PRINT STRING$(80, Char2%);
- NEXT
-
- END SUB
-
- SUB StarFlag
- COLOR 7, 0
- CLS
- LOCATE 4, 1
- PRINT " "; : COLOR 1, 7: PRINT "█"; : COLOR 15, 1: PRINT "";
- COLOR 1, 7: PRINT "███"; : COLOR 15, 1: PRINT " ";
- COLOR 1, 7: PRINT "█"; : COLOR 15, 1: PRINT "";
- COLOR 1, 7: PRINT "█████"; : COLOR 15, 1: PRINT "";
- COLOR 1, 7: PRINT "█████"; : COLOR 15, 1: PRINT "";
- COLOR 1, 7: PRINT "█████"; : COLOR 15, 1: PRINT "";
- COLOR 1, 7: PRINT "█████"; : COLOR 15, 1: PRINT "";
- COLOR 1, 7: PRINT "████"; : COLOR 4, 7: PRINT "██████████████████████████████████████████";
- COLOR 7, 0: PRINT " "; : PRINT " "; : COLOR 1, 7: PRINT "███";
- COLOR 15, 1: PRINT " "; : COLOR 1, 7: PRINT "████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█";
- COLOR 15, 4: PRINT "▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄";
- COLOR 7, 0: PRINT " "; : PRINT " "; : COLOR 1, 7: PRINT "█";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█";
- COLOR 15, 1: PRINT " "; : COLOR 1, 7: PRINT "█";
- COLOR 15, 1: PRINT " "; : COLOR 1, 7: PRINT "█";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "████";
- COLOR 15, 7: PRINT "██████████████████████████████████████████";
- COLOR 7, 0: PRINT " "; : PRINT " "; : COLOR 1, 7: PRINT "████";
- COLOR 15, 1: PRINT " "; : COLOR 1, 7: PRINT "████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█";
- COLOR 4, 7: PRINT "██████████████████████████████████████████";
- COLOR 7, 0: PRINT " "; : PRINT " "; : COLOR 1, 7: PRINT "█";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█";
- COLOR 15, 1: PRINT " "; : COLOR 1, 7: PRINT "█";
- COLOR 15, 1: PRINT " "; : COLOR 1, 7: PRINT "█";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "████";
- COLOR 15, 4: PRINT "▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄";
- COLOR 7, 0: PRINT " "; : PRINT " "; : COLOR 1, 7: PRINT "███";
- COLOR 15, 1: PRINT " "; : COLOR 1, 7: PRINT "████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█";
- COLOR 15, 7: PRINT "██████████████████████████████████████████";
- COLOR 7, 0: PRINT " "; : PRINT " "; : COLOR 1, 7: PRINT "█";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█";
- COLOR 15, 1: PRINT " "; : COLOR 1, 7: PRINT "█";
- COLOR 15, 1: PRINT " "; : COLOR 1, 7: PRINT "█";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "████";
- COLOR 4, 7: PRINT "██████████████████████████████████████████";
- COLOR 7, 0: PRINT " "; : PRINT " "; : COLOR 1, 7: PRINT "███";
- COLOR 15, 1: PRINT " "; : COLOR 1, 7: PRINT "████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█";
- COLOR 15, 4: PRINT "▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄";
- COLOR 7, 0: PRINT " "; : PRINT " "; : COLOR 1, 7: PRINT "█";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█";
- COLOR 15, 1: PRINT " "; : COLOR 1, 7: PRINT "█";
- COLOR 15, 1: PRINT " "; : COLOR 1, 7: PRINT "█";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "████";
- COLOR 15, 7: PRINT "██████████████████████████████████████████";
- COLOR 7, 0: PRINT " "; : PRINT " "; : COLOR 1, 7: PRINT "████";
- COLOR 15, 1: PRINT " "; : COLOR 1, 7: PRINT "████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█████";
- COLOR 15, 1: PRINT ""; : COLOR 1, 7: PRINT "█";
- COLOR 4, 7: PRINT "██████████████████████████████████████████";
- COLOR 7, 0: PRINT " "; : PRINT " "; : COLOR 15, 1: PRINT "▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄";
- COLOR 15, 4: PRINT "▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄";
- COLOR 7, 0: PRINT " "; : PRINT " "; : COLOR 15, 7: PRINT "██████████████████████████████████████████████████████████████████████████████";
- COLOR 7, 0: PRINT " "; : PRINT " "; : COLOR 4, 7: PRINT "██████████████████████████████████████████████████████████████████████████████";
- COLOR 7, 0: PRINT " "; : PRINT " "; : COLOR 15, 4: PRINT "▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄";
- COLOR 7, 0: PRINT " "; : PRINT " "; : COLOR 15, 7: PRINT "██████████████████████████████████████████████████████████████████████████████";
- COLOR 7, 0: PRINT " "; : PRINT " "; : COLOR 4, 7: PRINT "██████████████████████████████████████████████████████████████████████████████";
- COLOR 7, 0: PRINT " "; : PRINT " "; : COLOR 15, 4: PRINT "▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄";
- COLOR 7, 0: PRINT " "; : PRINT " "; : COLOR 15, 7: PRINT "██████████████████████████████████████████████████████████████████████████████";
- COLOR 7, 0: PRINT " "; : PRINT " "; : COLOR 4, 7: PRINT "██████████████████████████████████████████████████████████████████████████████";
- COLOR 7, 0: PRINT " "; : PRINT " "; : COLOR 4, 0: PRINT "▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ";
-
- END SUB
-
- SUB TextBoxShadow (Row%, Col%, Message$, Outline%, Shadow%, Length%)
-
- 'Adding other ancillary SUBs as "GOSUB"s so that they
- 'do not need to be imported into a new module.
- 'edited to omit the SUB TwoColr(Fgd%,Bkg,Colr%)
- 'and tested Sun 08-21-1994 21:25:34
-
- 'got to have a REDIM SHARED Box$(1 to 56) in main module
- 'Other SUB/FUNCTIONs still needed for this SUB are:
- 'SUB
- 'LocateIt(Row%, Text$)
- 'FUNCTION
- 'Center% (text$)
- '
- 'Puts a message into a three line box -or-
- 'draw a box without a message using Message$=SPACE$(x)
- 'where "x" is the width of the box and Length%= number of lines > 3
- 'Boxes are centered if Col% = 0; else left side of box = Col%.
- 'Boxes display a true shadow if Shadow% <> 0
- 'True = -1: False = 0
-
- STATIC BoxReadFlag
- Message$ = LEFT$(Message$, 60)
- BoxWidth% = LEN(Message$) + 4
- SELECT CASE Outline%
- CASE 0
- j = 8 * 6 + 1
- CASE 1
- j = 1
- CASE 2
- j = 8 + 1
- CASE 3
- j = 8 * 2 + 1
- CASE 4
- j = 8 * 3 + 1
- CASE 5
- j = 8 * 4 + 1
- CASE 6
- j = 8 * 5 + 1
- CASE ELSE
- j = 8 * 6 + 1
- END SELECT
-
- IF BoxReadFlag THEN GOTO Skip
- REDIM Box$(1 TO 56)
- BoxReadFlag = True
-
- 'single line box
- Box$(1) = "┌"
- Box$(2) = "─"
- Box$(3) = "┐"
- Box$(4) = "│"
- Box$(5) = "│"
- Box$(6) = "└"
- Box$(7) = "─"
- Box$(8) = "┘"
-
- 'double top box
- Box$(9) = "╒"
- Box$(10) = "═"
- Box$(11) = "╕"
- Box$(12) = "│"
- Box$(13) = "│"
- Box$(14) = "╘"
- Box$(15) = "═"
- Box$(16) = "╛"
-
- 'double side box
- Box$(17) = "╓"
- Box$(18) = "─"
- Box$(19) = "╖"
- Box$(20) = "║"
- Box$(21) = "║"
- Box$(22) = "╙"
- Box$(23) = "─"
- Box$(24) = "╜"
-
- 'double box
- Box$(25) = "╔"
- Box$(26) = "═"
- Box$(27) = "╗"
- Box$(28) = "║"
- Box$(29) = "║"
- Box$(30) = "╚"
- Box$(31) = "═"
- Box$(32) = "╝"
-
- 'bold box
- Box$(33) = "█"
- Box$(34) = "▀"
- Box$(35) = "█"
- Box$(36) = "█"
- Box$(37) = "█"
- Box$(38) = "█"
- Box$(39) = "▄"
- Box$(40) = "█"
-
- 'bold and thick box
- Box$(41) = "█"
- Box$(42) = "█"
- Box$(43) = "█"
- Box$(44) = "█"
- Box$(45) = "█"
- Box$(46) = "█"
- Box$(47) = "█"
- Box$(48) = "█"
-
- 'no box
- Box$(49) = " "
- Box$(50) = " "
- Box$(51) = " "
- Box$(52) = " "
- Box$(53) = " "
- Box$(54) = " "
- Box$(55) = " "
- Box$(56) = " "
-
- Skip:
-
-
-
- IF Col% = 0 THEN
-
- BoxText$ = Box$(j) + STRING$(BoxWidth%, Box$(j + 1)) + Box$(j + 2)
- GOSUB Location
- 'CALL LocateIt(Row%, BoxText$)
- Row2% = CSRLIN: Col2% = POS(0)
- Colr% = SCREEN(Row2%, Col2% - 1, 1)
- 'GOSUB GetTwoColors
- CALL TwoColrs(Fgd%, Bkg%, Colr%)
-
- FOR i = 1 TO Length% + 1
- BoxText$ = Box$(j + 3) + " " + Message$ + " " + Box$(j + 4)
- 'GOSUB Location
- CALL LocateIt(Row% + i, BoxText$)
-
- IF Shadow% THEN
- COLOR 7, 0
- FOR k = 1 TO 2
- PRINT CHR$(SCREEN(CSRLIN, POS(0)));
- NEXT
- COLOR Fgd%, Bkg%
- END IF
- NEXT i
-
- BoxText$ = Box$(j + 5) + STRING$(BoxWidth%, Box$(j + 6)) + Box$(j + 7)
- 'GOSUB Location
- CALL LocateIt(Row% + i, BoxText$)
-
- IF Shadow% THEN
- COLOR 7, 0
- FOR k = 1 TO 2
- PRINT CHR$(SCREEN(CSRLIN, POS(0)));
- NEXT
- 'COLOR Fgd%, Bkg%
-
- COLOR 7, 0
- LOCATE Row% + i + 1, Center(BoxText$) + 2
-
- FOR k = 1 TO BoxWidth% + 2
- PRINT CHR$(SCREEN(CSRLIN, POS(0)));
- NEXT
- COLOR Fgd%, Bkg%
- END IF
- ELSE
-
- BoxText$ = Box$(j) + STRING$(BoxWidth%, Box$(j + 1)) + Box$(j + 2)
- LOCATE Row%, Col%
- PRINT BoxText$;
- Row2% = CSRLIN: Col2% = POS(0)
- Colr% = SCREEN(Row2%, Col2% - 1, 1)
- GOSUB GetTwoColors
- 'CALL TwoColrs(Fgd%, Bkg%, Colr%)
-
- FOR i = 1 TO Length% + 1
- BoxText$ = Box$(j + 3) + " " + Message$ + " " + Box$(j + 4)
- LOCATE Row% + i, Col%
- PRINT BoxText$;
-
- IF Shadow% THEN
- COLOR 7, 0
- FOR k = 1 TO 2
- PRINT CHR$(SCREEN(CSRLIN, POS(0)));
- NEXT
- COLOR Fgd%, Bkg%
- END IF
-
- NEXT i
-
- BoxText$ = Box$(j + 5) + STRING$(BoxWidth%, Box$(j + 6)) + Box$(j + 7)
- LOCATE Row% + i, Col%
- PRINT BoxText$;
-
- IF Shadow% THEN
- COLOR 7, 0
- FOR k = 1 TO 2
- PRINT CHR$(SCREEN(CSRLIN, POS(0)));
- NEXT
-
- LOCATE Row% + i + 1, Col% + 2
- FOR k = 1 TO BoxWidth% + 2
- PRINT CHR$(SCREEN(CSRLIN, POS(0)));
- NEXT
- COLOR Fgd%, Bkg%
- END IF
-
- END IF
- EXIT SUB
- GetTwoColors:
- Fgd% = (Colr% AND 128) \ 8 + (Colr% AND 15)
- Bkg% = (Colr% AND 112) \ 16
- RETURN
-
- Location:
- LOCATE Row%, 41 - (LEN(BoxText$)) \ 2
- PRINT BoxText$;
- RETURN
-
- END SUB
-
- SUB TwoColrs (Fgd%, Bkg%, Colr%)
-
- Fgd% = (Colr% AND 128) \ 8 + (Colr% AND 15)
- Bkg% = (Colr% AND 112) \ 16
-
- END SUB
-
-